using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WinformDevelopFrame.IRepository;
using WinformDevelopFrame.Entity;

namespace WinformDevelopFrame.Repository
{
    public class sysexceptionlogRepository : BaseRepository<sysexceptionlog>, IsysexceptionlogRepository
    {
        private ISqlSugarClient _sqlSugarClient;
        public sysexceptionlogRepository(ISqlSugarClient sqlSugar) : base(sqlSugar)
        {
            _sqlSugarClient= sqlSugar;
        }

        public int Add(sysexceptionlog m)
        {
            return Insert(m);
        }

        public int AddList(List<sysexceptionlog> list)
        {
            return Insert(list);
        }

        public bool UpdateN(sysexceptionlog m)
        {
            return Update(m);
        }

        public bool UpdateList(List<sysexceptionlog> list)
        {
            return Update(list);
        }

        public bool DeleteN(sysexceptionlog m)
        {
            return Delete(m);
        }

        public bool DeleteList(List<sysexceptionlog> list)
        {
            return Delete(list);
        }

        public sysexceptionlog QueryById(int id)
        {
            return QueryByIdAsync(id).Result;
        }

        public List<sysexceptionlog> QueryList(List<int> ids)
        {
            return QueryByIDs(ids.ToArray());
        }
    }
}